<template>
  <div>
    <app-header></app-header>
    <left-slide></left-slide>
    11
    <router-view>

    </router-view>
  </div>
</template>

<script>
import {mapActions} from 'vuex'
import {AppHeader,leftSlide} from '@/components/Admin/components/index'
export default {
  methods: {
    ...mapActions([
      'getAdminInfo'
    ])
  },
  components: {
    AppHeader,
    leftSlide
  },
  computed: {
    isLogin () {
      return this.$store.getters.isAdminLogin
    }
  },
  async mounted() {
    await this.getAdminInfo({'a':11})
    if(!this.isLogin) {
      this.$router.push({name: 'admin/login'})
    }
  }
}
</script>

